﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ControlInCacNghiepVuNhanHang.ascx.cs" Inherits="UserControl_ControlInCacNghiepVuNhanHang" %>
<%@ Register Assembly="DevExpress.XtraReports.v9.2.Web, Version=9.2.6.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.XtraReports.Web" TagPrefix="dxxr" %>
<%@ Import Namespace="webapp4U" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register src="~/UserControl/ControlReportViewer.ascx" tagname="ReportViewerControl" tagprefix="uc1" %>


<%@ Register Assembly="webapp4U" Namespace="webapp4U.UI" TagPrefix="webapp4U"  %>

   <script type="text/javascript">
       function pageLoad() {
           $("#<%= imgBtnAdd.ClientID %>").click(function () {
               $.blockUI({ css: {
                   border: 'none',
                   padding: '15px',
                   backgroundColor: '#000',
                   '-webkit-border-radius': '10px',
                   '-moz-border-radius': '10px',
                   opacity: .5,
                   color: '#fff'
               }
               });
           });
           Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
           function EndRequestHandler(sender, args) {
               $.unblockUI();
           }
       }
</script>

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional" >
    <ContentTemplate>
        <div class="direct_container_right_titletop">
            In nghiệp vụ nhập hàng từ nhà cung cấp
        </div>
         <!-- Button chuc nang-->
                <div class="direct_container_main">
                    <asp:ImageButton ID="imgBtnAdd" onclick="imgBtnAdd_Click" CausesValidation="false" ImageUrl="~/Images/Refresh.png" Width="32px" Height="32px" runat="server" />
                   
                </div>
                <!-- End Button chuc nang-->
        <cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" BackColor="#CCFFFF"
            Font-Names="Arial" Width="100%">
        <cc1:TabPanel ID="TabPanel1" runat="server" HeaderText="Hóa đơn đã nhập" TabIndex="0">
            <ContentTemplate> 
        <div class="direct_container_main">
                    <div class="direct_container_form_right">
           <table width="100%">
                
               
                <tr>
                    <td >
                        <asp:GridView ID="grdvNghiepVuNhanHangLists" AutoGenerateColumns="False"
                        DataKeyNames="Số Hóa Đơn"                             
                        runat="server" Width="100%"
                        onselectedindexchanged="grdvNghiepVuNhanHangLists_SelectedIndexChanged"
                        ForeColor="#333333" GridLines="None" EnableModelValidation="True" 
                            onpageindexchanging="grdvNghiepVuNhanHangLists_PageIndexChanging">
                        <AlternatingRowStyle BackColor="White" />
                        <Columns>
                            <asp:TemplateField HeaderText="Nhà cung cấp">
                                <HeaderTemplate>Nhà cung cấp</HeaderTemplate>
                                <ItemTemplate>
                                        <%# Eval("Nhà Cung Cấp")%>                                          
                                </ItemTemplate>                                
                                <HeaderStyle HorizontalAlign="Left" />
                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Số hóa đơn">
                                <HeaderTemplate>Số hóa đơn</HeaderTemplate>
                                <ItemTemplate>
                                        <%# Eval("Số Hóa Đơn")%>
                                </ItemTemplate>                                
                                <HeaderStyle HorizontalAlign="Left" Width="100px" />
                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="100px" />
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Ngày">
                                <HeaderTemplate>Ngày</HeaderTemplate>
                                <ItemTemplate>
                                    <asp:Label ID="lbNgayHoaDon" runat="server" Text='<%# Eval("Ngày")%>'></asp:Label>
                                </ItemTemplate>                                
                                <HeaderStyle HorizontalAlign="Left" Width="100px" />
                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="100px" />
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Tổng Tiền">
                                <HeaderTemplate>Tổng tiền</HeaderTemplate>
                                <ItemTemplate>
                                    <%# Eval("Tổng Tiền")%>
                                </ItemTemplate>                                
                                <HeaderStyle HorizontalAlign="Left" Width="150px" />
                                <ItemStyle Height="40px" HorizontalAlign="Left" Width="150px" />
                            </asp:TemplateField>

                            <asp:TemplateField HeaderText="Đã in">
                                <HeaderTemplate>Đã in</HeaderTemplate>
                                <ItemTemplate>
                                    <input id="chkActive" runat="server" checked='<%# Eval("Đã in") %>' type="checkbox" style="width:10px" disabled="disabled"/>                                   
                                    <%--<asp:CheckBox runat="server" ID="chkActive" Enabled="false" CausesValidation="false" Checked='<%# Eval("Active") %>' Width="10px" />--%>
                                </ItemTemplate>                                                                
                                <HeaderStyle HorizontalAlign="Center" Width="100px" />
                                <ItemStyle Height="40px" HorizontalAlign="Center" Width="100px" />
                            </asp:TemplateField>

                            <asp:TemplateField
                                HeaderText="Xem và in">
                                <HeaderTemplate>
                                    Xem và In
                                </HeaderTemplate>
                                <ItemTemplate> 
                                    <asp:ImageButton ID="btnDelete" runat="server" CausesValidation="false" CommandName="Select" ImageUrl="~/Images/icon_print.png" ToolTip="Xem và In" ></asp:ImageButton> 
                                </ItemTemplate>               
                                <HeaderStyle Width="70px" />
                                <ItemStyle HorizontalAlign="Center" Width="70px" />
                            </asp:TemplateField> 
                            
                    </Columns>
                        <FooterStyle  BackColor="#990000" Font-Bold="True" ForeColor="White" />
                        <HeaderStyle BackColor="#0066CC" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#FFCC66" ForeColor="#333333" HorizontalAlign="Center" />
                        <RowStyle BackColor="#FFFBD6" ForeColor="#333333" />
                        <SelectedRowStyle BackColor="#FFCC66" Font-Bold="True" ForeColor="Navy" />
                    </asp:GridView>
                    <!-- ----------------------------------------------------------------------------------------------- -->
                      
                    </td>
                </tr>
           </table>
                  </div>
                </div>
                </ContentTemplate>
                
            </cc1:TabPanel>
            
            <cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="Chi tiết in" TabIndex="1">
                <ContentTemplate>
                    
                    <uc1:ReportViewerControl ID="ControlReportViewer1" runat="server" />              
                </ContentTemplate>
            </cc1:TabPanel>                
        </cc1:TabContainer>
    </ContentTemplate>   
    
</asp:UpdatePanel>